<!DOCTYPE html>
<html>

<head>
<meta charset="UTF-8">
<title>管理员列表-WeAdmin Frame型后台管理系统-WeAdmin 1.0</title>
<meta name="renderer" content="webkit">
<meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
<meta name="viewport"
	content="width=device-width, initial-scale=1.0, minimum-scale=1.0, maximum-scale=1.0, user-scalable=0">
<link rel="stylesheet" href="../../static/css/font.css">
<link rel="stylesheet" href="../../static/css/weadmin.css">
<!-- 让IE8/9支持媒体查询，从而兼容栅格 -->
<!--[if lt IE 9]>
	      <script src="https://cdn.staticfile.org/html5shiv/r29/html5.min.js"></script>
	      <script src="https://cdn.staticfile.org/respond.js/1.4.2/respond.min.js"></script>
	    <![endif]-->
</head>

<body>
	<div class="weadmin-nav">
		<span class="layui-breadcrumb"> <a href="">首页</a> <a href="">管理员管理</a>
			<a> <cite>管理员列表</cite></a>
		</span> <a class="layui-btn layui-btn-sm"
			style="line-height: 1.6em; margin-top: 3px; float: right"
			href="javascript:location.replace(location.href);" title="刷新"> <i
			class="layui-icon" style="line-height: 30px">ဂ</i></a>
	</div>
	<div class="weadmin-body">
		<div class="layui-row">
			<form class="layui-form layui-col-md12 we-search">
				<div class="layui-inline">
					<input class="layui-input" placeholder="开始日" name="start"
						id="start">
				</div>
				<div class="layui-inline">
					<input class="layui-input" placeholder="截止日" name="end" id="end">
				</div>
				<div class="layui-inline">
					<input type="text" name="username" placeholder="请输入用户名"
						autocomplete="off" class="layui-input">
				</div>
				<button class="layui-btn" lay-submit="" lay-filter="sreach">
					<i class="layui-icon">&#xe615;</i>
				</button>
			</form>
		</div>
		<div class="weadmin-block">
			<button class="layui-btn layui-btn-danger" onclick="delAll()">
				<i class="layui-icon"></i>批量删除
			</button>
			<button class="layui-btn" onclick="WeAdminShow('添加用户','./add.html')">
				<i class="layui-icon"></i>添加
			</button>
			<span class="fr" style="line-height: 40px">共有数据：88 条</span>
		</div>
		<table class="layui-hide" id="list"></table>
		<div class="page">
			<div>
				<a class="prev" href="">&lt;&lt;</a> <a class="num" href="">1</a> <span
					class="current">2</span> <a class="num" href="">3</a> <a
					class="num" href="">489</a> <a class="next" href="">&gt;&gt;</a>
			</div>
		</div>
	</div>
	<script src="../../lib/layui/layui.js" charset="utf-8"></script>
	<script src="../../static/js/eleDel.js" type="text/javascript"
		charset="utf-8"></script>
	<script type="text/javascript" charset="utf-8">
    	layui.extend({
			myHttp : '{/}../../static/js/myHttp'
		});
		layui.use(['jquery', 'myHttp', 'table'], function(){
			var $ = layui.jquery;
			var myHttp = layui.myHttp;
			var table = layui.table;
			$(function(){
				var token = localStorage.getItem("token");
				table.render({
					  elem: '#list'
					  ,method:'post'
					  ,contentType: 'application/json'
					  ,headers: {Authorization: token}
					  ,url: '/user/list'
					  ,cols: [[
					      {checkbox: true, fixed: true}
					      ,{field:'id', title: 'ID', width:80, sort: true, fixed: true}
					      ,{field:'username', title: '用户名'}
					      ,{field:'userType', title: '类型'}
					      ,{field:'state', title: '状态'}
					      ,{field:'createTime', title: '创建时间' }
					    ]]
					  ,parseData: function(res){ //res 即为原始返回的数据
					    return {
					      "code": 0, //解析接口状态
					      "msg": res.msg, //解析提示文本
					      "data": res.data.content //解析数据列表
					    };
					  }
					  
					});    
				return false;
			});
		});
    	</script>
</body>

</html>